
#include <iostream>
#include <cassert>
#include <map>
using namespace std;

template <typename T, typename U>
class CCreateMap
{
private:
  std::map<T, U> m_map;

public:
  CCreateMap(const T &key, const U &val)
  {
    m_map[key] = val;
  }
  CCreateMap<T, U> &operator()(const T &key, const U &val)
  {
    m_map[key] = val;
    return *this;
  }
  // 类型转换运算符
  operator std::map<T, U>()
  {
    return m_map;
  }
};

int main()
{
  std::map<int, int> mymap = CCreateMap<int, int>(1, 2)(3, 4)(5, 6);
  cout << (mymap.find(5) == mymap.end()) << endl;
  cout << (mymap.find(10) == mymap.end()) << endl;
  return 0;
}
